{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import os\n",
    "import sys\n",
    "sys.path.append(r'D:\\codeproject\\data-process')\n",
    "from function.merger import long_term_ecg_deal\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "def rpe_get(file):\n",
    "    ecg=long_term_ecg_deal(file)\n",
    "    #读取列中非'-'的值\n",
    "    psychology_RPE= list(set(ecg[ecg['psychology_RPE'] != '-']['psychology_RPE']))\n",
    "    physiology_RPE= list(set(ecg[ecg['physiology_RPE'] != '-']['physiology_RPE']))\n",
    "    now_RPE = list(set(ecg[ecg['now_RPE'] != '-']['now_RPE']))\n",
    "    train_RPE= list(set(ecg[ecg['train_RPE'] != '-']['train_RPE']))\n",
    "    return [psychology_RPE,physiology_RPE,now_RPE,train_RPE]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[[], ['0', '2'], ['0'], ['0%']]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rpe_get(r'D:\\学习&科研\\华为手表项目\\华为数据\\long_term\\polar\\1016\\data\\1016-ecgdata-2024-09-10-21时40分23秒.csv')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "MLandDL",
   "language": "python",
   "name": "mlanddl"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.20"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
